// 任务类型枚举
export enum TaskType {
  CRAWL_VIDEO_TYPES = 'CRAWL_VIDEO_TYPES',
  CRAWL_VIDEO_DETAILS = 'CRAWL_VIDEO_DETAILS',
  CRAWL_ALL_VIDEO_DETAILS = 'CRAWL_ALL_VIDEO_DETAILS',
}

// 任务状态枚举
export enum TaskStatus {
  PENDING = 'PENDING',
  RUNNING = 'RUNNING',
  COMPLETED = 'COMPLETED',
  FAILED = 'FAILED',
}

// 任务参数接口
export interface TaskParams {
  page?: number;
  limit?: number;
  maxPages?: number;
}

// 任务结果接口
export interface TaskResult {
  success: boolean;
  data?: unknown;
  error?: string;
  message?: string;
}

// 任务对象接口
export interface Task {
  id: string;
  type: TaskType;
  status: TaskStatus;
  params: TaskParams;
  result?: TaskResult;
  createdAt: Date;
  updatedAt: Date;
  scheduledAt?: Date;
  startedAt?: Date;
  completedAt?: Date;
  cron?: string; // cron表达式，用于定时任务
} 